package com.main.utils;

import java.sql.SQLException;

import org.hibernate.HibernateException;
import org.hibernate.SessionFactory;

public class HibernateUtils {

	@SuppressWarnings("deprecation")
	public static void IdentityInsertOn(SessionFactory sessionFactory, String tableName) throws HibernateException, SQLException{
		sessionFactory.getCurrentSession().connection().createStatement().execute("SET IDENTITY_INSERT " + tableName + " ON");
	}
}
